package com.xs.project.mapper;

import com.xs.project.pojo.vo.CourseReq;
import com.xs.project.pojo.vo.LoginReq;
import com.xs.project.pojo.vo.SubExamTitle;
import com.xs.project.pojo.vo.resp.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface LoginMapper {
    UserInfoResp selectUser(LoginReq req);

    void insertUser(LoginReq req);

    void updateUser(LoginReq req);

    List<CourseVo> selectCourseList(CourseReq req);

    Integer selectStudentNum(Integer id);

    CourseVo selectCourseByid(String courseId);

    List<CourseSubVo> selectCourseSubList(@Param("courseId") String courseId,@Param("userId") String userId);

    ExamVo getExamDetail(String examId);

    List<ExamTitleVo> getExamTitle(String examId);

    Integer selectExamTitle(SubExamTitle subExamTitle);

    ExamTitleEnt getCorrectAnswer(SubExamTitle examTitle);

    void insertExamTitle(SubExamTitle examTitle);

    Integer getExamIdByUserId(String userId);

    void saveHomeWork(HomeWorkVo courseResourceVo);

    ExamResVo selectCourseByUserId(String userId);
}
